import React from 'react'
import css from "./myinput.module.css"
function Myinput(props) {
    //实现双向数据绑定
    let [value, setValue] = props.vmodel
    let vtype = props.vtype
    // 用户输入数据改变父组件中的变量的值
    let change1 = (e) => {
        // console.log(e)
        setValue(e.target.value)
    }
    return (
        <div>
            <input className={css.inputbox} type={vtype} value={value} onInput={change1} />
        </div>
    )
}

export default Myinput
